<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script crossorigin="anonymous" integrity="sha384-mlceH9HlqLp7GMKHrj5Ara1+LvdTZVMx4S1U43/NxCvAkzIo8WJ0FE7duLel3wVo" src="https://lib.baomitu.com/jquery/3.4.1/jquery.js"></script>
<script>
    var str = 'src\\router\\api\\use\\test.js';
    alert(str.match(/router(\S*).js/)[1]); // 请求名
    //alert(str.substr(str.lastIndexOf("\\")+1) ); // 文件名
    alert(str.match(/router(\S*)\\/)[1]); // 标的

    $.ajax({
        url : `http://127.0.01:8088/api/use/test?id=0&op=3`,
        type : 'get',
        data : {},
        headers : {},
        success : function (res) {
            console.log(res)
        },
        error : function (error) {
            console.log(error)
        }
    });
    /*$.ajax({
        url : `http://127.0.01:8088/api/user`,
        type : 'post',
        data : {
            name : 1,
        },
        headers : {},
        success : function (res) {
            console.log(res)
        },
        error : function (error) {
            console.log(error)
        }
    })*/
</script>
